home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / pmake / unix / rmt.c < prev   
Encoding:
C/C++ Source or Header  |  1989-11-15  |  4.1 KB  |  188 lines

  1. /*-
  2.  * rmt.c --
  3.  *    Functions to handle the exportation of targets. This isn't done,
  4.  *    so all the functions in this file are more or less noops. They do
  5.  *    describe what each function needs to do, however, so use the headers
  6.  *    as a reference when creating a new method of distribution.
  7.  *
  8.  * Copyright (c) 1988 by the Regents of the University of California
  9.  * Copyright (c) 1988 by Adam de Boor
  10.  *
  11.  * Permission to use, copy, modify, and distribute this
  12.  * software and its documentation for any purpose and without
  13.  * fee is hereby granted, provided that the above copyright
  14.  * notice appears in all copies.  Neither the University of California nor
  15.  * Adam de Boor makes any representations about the suitability of this
  16.  * software for any purpose.  It is provided "as is" without
  17.  * express or implied warranty.
  18.  *
  19.  * Interface:
  20.  *    Rmt_Init              Initialize things for this module
  21.  *
  22.  *    Rmt_AddServer            Add the given name as the address of
  23.  *                          an export server.
  24.  *
  25.  *    Rmt_Begin             Prepare to export another job and tell
  26.  *                          if it can actually be exported.
  27.  *
  28.  *    Rmt_Exec              Execute the given shell with argument vector
  29.  *                          elsewhere.
  30.  *
  31.  *    Rmt_LastID            Return an unique identifier for the last
  32.  *                          job exported.
  33.  *
  34.  *    Rmt_Done              Take note that a remote job has finished.
  35.  *
  36.  */
  37. #ifndef lint
  38. static char *rcsid =
  39. "$Id: rmt.c,v 1.1 89/06/13 17:05:36 adam Exp $ SPRITE (Berkeley)";
  40. #endif lint
  41.  
  42. #include    "make.h"
  43.  
  44. /*-
  45.  *-----------------------------------------------------------------------
  46.  * Rmt_Init --
  47.  *    Initialize this module...
  48.  *
  49.  * Results:
  50.  *    None.
  51.  *
  52.  * Side Effects:
  53.  *    Depends on the exportation to be used...
  54.  *
  55.  *-----------------------------------------------------------------------
  56.  */
  57. void
  58. Rmt_Init()
  59. {
  60. }
  61.  
  62. /*-
  63.  *-----------------------------------------------------------------------
  64.  * Rmt_AddServer --
  65.  *    Add a server to the list of those known.
  66.  *
  67.  * Results:
  68.  *    None.
  69.  *
  70.  * Side Effects:
  71.  *    Who knows?
  72.  *
  73.  *-----------------------------------------------------------------------
  74.  */
  75. /*ARGSUSED*/
  76. void
  77. Rmt_AddServer (name)
  78.     char    *name;
  79. {
  80.  
  81. }
  82.  
  83. /*-
  84.  *-----------------------------------------------------------------------
  85.  * Rmt_ReExport --
  86.  *    Supposed to re-export a job that's come home.
  87.  *
  88.  * Results:
  89.  *    FALSE if job couldn't be re-exported and TRUE if it could.
  90.  *
  91.  * Side Effects:
  92.  *    None.
  93.  *
  94.  *-----------------------------------------------------------------------
  95.  */
  96. /*ARGSUSED*/
  97. Boolean
  98. Rmt_ReExport(pid)
  99.     int        pid;
  100. {
  101.     return(FALSE);
  102. }
  103.  
  104. /*-
  105.  *-----------------------------------------------------------------------
  106.  * Rmt_Begin --
  107.  *    Prepare to export a job.
  108.  *
  109.  * Results:
  110.  *    TRUE if the job can be exported. FALSE if it cannot.
  111.  *
  112.  * Side Effects:
  113.  *
  114.  *-----------------------------------------------------------------------
  115.  */
  116. /*ARGSUSED*/
  117. Boolean
  118. Rmt_Begin (file, argv, gn)
  119.     char          *file;
  120.     char          **argv;
  121.     GNode         *gn;
  122. {
  123.     return FALSE;
  124. }
  125.  
  126. /*-
  127.  *-----------------------------------------------------------------------
  128.  * Rmt_Exec --
  129.  *    Execute a process elsewhere.
  130.  *
  131.  * Results:
  132.  *    None.
  133.  *
  134.  * Side Effects:
  135.  *    That remains to be seen.
  136.  *
  137.  *-----------------------------------------------------------------------
  138.  */
  139. /*ARGSUSED*/
  140. void
  141. Rmt_Exec (file, args, traceMe)
  142.     char    *file;
  143.     char    **args;
  144.     Boolean traceMe;
  145. {
  146.     (void)execv (file, args);
  147. }
  148.  
  149. /*-
  150.  *-----------------------------------------------------------------------
  151.  * Rmt_LastID --
  152.  *    Return an unique identifier for the last job exported with Rmt_Exec
  153.  *
  154.  * Results:
  155.  *    Some sort of identifier.
  156.  *
  157.  * Side Effects:
  158.  *    ???
  159.  *
  160.  *-----------------------------------------------------------------------
  161.  */
  162. int
  163. Rmt_LastID(pid)
  164.     int              pid;        /* PID of job last exported */
  165. {
  166.     return 0;
  167. }
  168.  
  169. /*-
  170.  *-----------------------------------------------------------------------
  171.  * Rmt_Done --
  172.  *    Register the completion of a remote job.
  173.  *
  174.  * Results:
  175.  *    None.
  176.  *
  177.  * Side Effects:
  178.  *    Probably.
  179.  *
  180.  *-----------------------------------------------------------------------
  181.  */
  182. /*ARGSUSED*/
  183. void
  184. Rmt_Done (id)
  185.     int        id;
  186. {
  187. }
  188.